import { apiConstants,loadConfirmModal,loadModalInfo } from '@/js/utils'
import footerMenu from '@/components/mainPage/footer'


new Vue({
  el: "#app",
  data() {
    return {

    }
  },
  created() {

  },
  methods: {
    logout(){
      let _this = this;
      loadConfirmModal("您确定要退出登录？", () => {
        _this.$Toast.start();
        _this.$ajax(apiConstants.login_logout, {
          data: {
            phone: phone,
            openid: openid,
          },
          success: function (data) {
            axios.post('/doLoginOut', {
            }).then(({ data }) => {
              _this.$Toast.finish()
              location.href="/login";
            }).catch(e => {
              _this.$Toast.finish()
              loadModalInfo(e.message,"/images/login/icon_warning.png");
            })
          },
        })
      },  ()=>{

      }, "确定");
    },
  },
  components: {footerMenu}
});
